/**
 * crawler
 *
 * outlook@China software studio
 * Copyright (c) 2008-2010. All Rights Reserved.
 * http://www.outlook.com
 */

package org.outlook.common.queue;

/**
 * function:
 * 
 * @author Watson email: watson.wu@hotmail.com
 * @date 2011
 */
public abstract class Task implements Runnable {

	private Object msg;

	public Object getMsg() {
		return msg;
	}

	public void setMsg(Object msg) {
		this.msg = msg;
	}

	public Task() {
		super();
	}

	public Task(Object msg) {
		this.msg = msg;
	}

	public void run() {
		
	}

	@Override
	public String toString() {
		return getMsg().toString(); 
	}

	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof Task)) return false;
		return getMsg().equals(((Task)obj).getMsg());
	}

}
